<template>
	<view>
		<div class="kecheng">
			<!-- 切换 -->
			<view>
				<view class="uni-padding-wrap uni-common-mt">
					<uni-segmented-control :current="current" :values="items" :style-type="styleType" :active-color="activeColor"
						@clickItem="onClickItem" />
				</view>
				<view class="content">
					<!-- 线上培训 -->
					<view v-if="current === 0">
						

					</view>
					<!-- 线下培训 -->
					<view v-if="current === 1">

					</view>
				</view>

			</view>



		</div>
	</view>
</template>

<script>
	import {
		loginyyc
	} from '../../api/index.js'
	export default {
		data() {
			return {
				tupianimg: [],
				items: ['登录', '注册'],
				current: 0,
				colorIndex: 0,
				activeColor: '#31D4D3',
				styleType: 'text',

			}
		},
		components: {

		},
		methods: {
			onClickItem(e) {
				if (this.current !== e.currentIndex) {
					this.current = e.currentIndex
				}
			},
		},
		created() {
			loginyyc().then(res => {
				console.log(res.data);
			}).catch(error => {
				console.error('Error refreshing data:', error);
			});
		}
	}
</script>

<style>







</style>